import { FC } from 'react'
import { ConditionSchema } from '@src/components/schema/condition'
import { ComponentProps } from './components/interface'

import CasenoDesc from './components/casenoDesc'
import Procedure from './components/procedure'
import CauseAction from './components/causeAction'
import Processer from './components/processer'
import Accepter from './components/accepter'
import AcceptDate from './components/acceptDate'
import DocketDate from './components/docketDate'
import ClosureReportDatetime from './components/closureReportDatetime'
import ClosureAuditDatetime from './components/closureAuditDatetime'
import ClosureDate from './components/closureDate'
import ClosureType from './components/closureType'
import FileDatetime from './components/fileDatetime'
import ApplicantName from './components/applicantName'
import RespondentName from './components/respondentName'
import Arbitrator from './components/arbitrator'
import DisputeAmount from './components/disputeAmount'
import CounterDisputeAmount from './components/counterDisputeAmount'
import DisputeAmountAll from './components/disputeAmountAll'
import AssignDatetime from './components/assignDatetime'
import BeginHearingDatetime from './components/beginHearingDatetime'

export interface FormItemSchema {
  [k: string]: {
    component: FC<ComponentProps>
    initFormat: (f: { [k: string]: any }, t: { [k: string]: any }) => void
    changeFormat: (o: { [k: string]: any }) => void
    getCondition: (d: { [k: string]: any }) => ConditionSchema[]
  }
}
export const FormItems: FormItemSchema = {
  caseno_desc: CasenoDesc,
  procedure: Procedure,
  cause_action: CauseAction,
  processer: Processer,
  accepter: Accepter,
  accept_datetime: AcceptDate,
  docket_datetime: DocketDate,
  closure_report_datetime: ClosureReportDatetime,
  closure_audit_datetime: ClosureAuditDatetime,
  closureDate: ClosureDate,
  closure_type: ClosureType,
  file_datetime: FileDatetime,
  applicant_name: ApplicantName,
  respondent_name: RespondentName,
  arbitrator: Arbitrator,
  dispute_amount: DisputeAmount,
  counter_dispute_amount: CounterDisputeAmount,
  dispute_amount_all: DisputeAmountAll,
  assign_datetime: AssignDatetime,
  begin_datetime: BeginHearingDatetime
}
